<template>
	<view style="padding-top: 100rpx;">
		<view class="text-area">
			<text>输入值:</text><input type="text" v-model="inputtext" style="color: red;"/>
		</view>
		<view class="text-area">
			<text>回传值:</text><input type="text" :value="callBackValue" style="color: yellow;"/>
		</view>
		<ComA :intent="inputtext"></ComA>
		<ComB @callBackFun="callBack"></ComB>
	</view>
</template>

<script>
	import ComA from '../../components/ComA.vue';
	import ComB from '../../components/ComB.vue';
	export default {
		components:{
			ComA,
			ComB
		},
		data() {
			return {
				inputtext:'',
				callBackValue:""
			}
		},
		methods: {
			callBack(message){
				console.log("Intent callBack" + message);
				this.callBackValue = message
			}
		}
	}
</script>

<style>
	.text-area{
		padding-left: 30px;
		padding-top: 10px;
		display: flex;
	}
	input{
		background-color: darkgray;
		margin-left: 20px;
	}
</style>
